package hos.java.color;

import java.util.Map;

/**
 * <p>Title: ColorSwatch </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023/3/28 20:56
 */
public class ColorSwatch<T> {
    private Map<T, Integer> swatch;

    private final Integer value;

    public ColorSwatch(int primary, Map<T, Integer> swatch) {
        value = primary;
        this.swatch = swatch;
    }

    /// Returns an element of the swatch table.
    Integer get(T index) {
        return swatch.get(index);
    }

    public Integer getValue() {
        return value;
    }
}
